Re: [GENERAL] DDL for postgres database
От | Herouth Maoz |
---|---|
Тема | Re: [GENERAL] DDL for postgres database |
Дата | |
Msg-id | l03110701b18d9130e166@[147.233.159.109] обсуждение исходный текст |
Ответ на | DDL for postgres database (The Hermit Hacker <scrappy@hub.org>) |
Список | pgsql-general |
At 6:42 +0300 on 24/5/98, The Hermit Hacker wrote: > Hi, > > I have used postgres for our application. > Our customer is asking us to give them the DDL (data definition > language) files for the database. > > I don't know what the customer means and feel awkward to ask them. > May be someone could give me a hint? > > If anyone knows what DDL means for the postgres database, > please let me know ASAP. Thanks a million. DDL (Data Definition language) is the part of SQL that has to do with the definition of the data structure, as opposed to queries, insertions and updates, which are called "Data manipulation language", if I'm not mistaken (it is less commonly used). In practice, this basically means all the "CREATE TABLE", "DROP TABLE", "CREATE SEQUENCE", and I think also "CREATE INDEX", "DROP INDEX", "GRANT", "REVOKE". In short, anything which is not "SELECT", "UPDATE" or "INSERT". To give your clients the DDL files, what you need to do is: pg_dump -S _database_name_ (Replace _database_name_ with the name of the database). It would be preferable if you created the database originally using SQL files. It's more orderly that way. You should have comments in files like that, for example. Also, you usually use only the parts of commands like CREATE SEQUENCE which interest you. The result of the above pg_dump gives you all the parameters, including those which are not really relevant for your application. However, if you just created the database and changed it on the fly, the pg_dump will have to do. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma
В списке pgsql-general по дате отправления: